<?xml version="1.0" encoding="utf-8"?>

<!--
SPDX-FileCopyrightText: Adam Evyčędo

SPDX-License-Identifier: GPL-3.0-or-later
-->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".AboutActivity">

    <com.google.android.material.imageview.ShapeableImageView
        android:id="@+id/logo"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_marginTop="32dp"
        android:background="@color/bimba_grey"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:shapeAppearanceOverlay="@style/roundedImageView"
        app:srcCompat="@drawable/ic_launcher_foreground" />

    <TextView
        android:id="@+id/app_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/app_name"
        android:textAppearance="@style/TextAppearance.AppCompat.Display1"
        app:layout_constraintEnd_toEndOf="@+id/logo"
        app:layout_constraintStart_toStartOf="@+id/logo"
        app:layout_constraintTop_toBottomOf="@+id/logo" />

    <TextView
        android:id="@+id/version"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/versionName"
        app:layout_constraintEnd_toEndOf="@+id/app_name"
        app:layout_constraintStart_toStartOf="@+id/app_name"
        app:layout_constraintTop_toBottomOf="@+id/app_name" />

    <TextView
        android:id="@+id/description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="48dp"
        android:layout_marginEnd="8dp"
        android:text="@string/app_description"
        android:textAppearance="@style/TextAppearance.AppCompat.Body1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/app_name" />

    <androidx.constraintlayout.helper.widget.Flow
        android:id="@+id/links"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="32dp"
        android:layout_marginEnd="8dp"
        app:constraint_referenced_ids="website,code,translate,mastodon"
        app:flow_horizontalGap="16dp"
        app:flow_horizontalStyle="packed"
        app:flow_verticalGap="4dp"
        app:flow_wrapMode="chain"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/description" />

    <Button
        android:contentDescription="@string/website_button_description"
        android:id="@+id/website"
        style="@style/Widget.Material3.Button.IconButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        tools:ignore="MissingConstraints"
        app:icon="@drawable/website" />

    <Button
        android:contentDescription="@string/code_button_description"
        android:id="@+id/code"
        style="@style/Widget.Material3.Button.IconButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        tools:ignore="MissingConstraints"
        app:icon="@drawable/code" />

    <Button
        android:contentDescription="@string/mastodon_button_description"
        android:id="@+id/mastodon"
        style="@style/Widget.Material3.Button.IconButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        tools:ignore="MissingConstraints"
        app:icon="@drawable/mastodon" />

    <Button
        android:contentDescription="@string/translation_button_description"
        android:id="@+id/translate"
        style="@style/Widget.Material3.Button.IconButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        tools:ignore="MissingConstraints"
        app:icon="@drawable/translate" />

    <TextView
        android:id="@+id/credits"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="32dp"
        android:layout_marginEnd="8dp"
        android:autoLink="web"
        android:text="@string/credits"
        android:textAppearance="@style/TextAppearance.AppCompat.Body1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/links" />

</androidx.constraintlayout.widget.ConstraintLayout>
